package com.example.tests;

import org.testng.annotations.Test;

public class ContactCreationTests extends TestBase {

	
	@Test
	public void testNonEmptyContactCreation() throws Exception {
		app.getNavigationHelper().openMainPage();
		app.getContactHelper().gotoContactPage();
		ContactData contact = new ContactData();
		contact.firstName = "first name 1";
		contact.secondName = "second name 2";
		contact.firstAddress = "first address 1";
		contact.homeTel = "544-25-87";
		contact.mobileTel = "8-921-895-85-74";
		contact.workTel = "852-85-85";
		contact.email1 = "test1@mail.ru";
		contact.email2 = "test2@mail.ru";
		contact.birthday = "1";
		contact.birthmonth = "January";
		contact.birthyear = "1999";
		contact.secondAddress = "secondary address 1";
		contact.secondTel = "home 1";
		app.getContactHelper().fillContactPage(contact);
		app.getContactHelper().submitContactCreation();
		app.getContactHelper().returnHomePage();
	}

	@Test
	public void testEmptyContactCreation() throws Exception {
		app.getNavigationHelper().openMainPage();
		app.getContactHelper().gotoContactPage();
		ContactData contact = new ContactData();
		contact.firstName = "";
		contact.secondName = "";
		contact.firstAddress = "";
		contact.homeTel = "";
		contact.mobileTel = "";
		contact.workTel = "";
		contact.email1 = "";
		contact.email2 = "";
		contact.birthday = "-";
		contact.birthmonth = "-";
		contact.birthyear = "";
		contact.secondAddress = "";
		contact.secondTel = "";
		app.getContactHelper().fillContactPage(contact);
		app.getContactHelper().submitContactCreation();
		app.getContactHelper().returnHomePage();
	}
	
}
